home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
amac33.arc
/
SIZE13.QM
< prev
next >
Wrap
Text File
|
1991-04-28
|
9KB
|
185 lines
* SIZE13.QM, 1.3b
* Macros To Show Byte Size of Macros
* @9 Shows byte size of ALL macros in a txtfile.
* @0 Shows byte size of SINGLE macro.
* SIZE13.QM are QEdit macros to quickly show byte size of a macro
* added to the end of the macro with an asterisk and space in column 1.
* See the end of each of these macros for byte size.
* The beeps you hear when executing @9 are finding and bypassing
* paragraphs that are not macros.
* These macros require "QEdit and QMAC v2.1, February, 1990" or later.
*
* To BEGIN, just type "START SIZE" <Enter>. All pertinent files will be
* loaded in the "Ring" for viewing, and SIZE13.MAC is read.
* Alternatively, type "START SIZE 0" <Enter> and the disk copies of all
* files in the "Ring" will be loaded ready for editing, saving time.
* Version History:
* 1.0 - Initial
* 1.1 - Added Alt_9 to show size of all macros in txtfile
* 1.1a - Modified @9 for paragraphs that are not macros
* 1.1b- Changed other file names in series, this is an update.
* 1.2 - Changed documentation only.
* - Changed .LST and .QL files.
* 1.3 - Modified macros slightly, @0 now checks if
* paragraph is a macro, like @9.
* 1.3a - Removed [d:]\[path] for location of QMAC from QMACB.BAT
* files. QMAC can be located anywhere in path.
* 1.3b - Modified documentation and added START.BAT.
* For other macros see ALLMACRO.INF.
*┌───────────────────────────────────────────────────────┐
*│ @9 Macro to show byte size of ALL macros in a txtfile │
*└───────────────────────────────────────────────────────┘
* To run, cursor may be anywhere in a txtfile. Press Alt and 9 at the
* same time, and the size of each macro is added at the end of each
* macro with an asterisk in column 1. Macros must be paragraphs with
* no blank lines, but paragraphs need NOT contain macros.
* Insert must be ON.
@9 macrobegin
begfile * get to begin of file
unmarkblock insertline begline * insert temp line
dropanchor currentfilename *
storescrbuff "1" return * get to scrbuff 1
cut * delete temp line
cursordown * move into macro
jtrue LASTLINE: * if cannot cursor down
endfile * are at endfile-no blank line
addline * put blank line
prevpara * go to parA Begin
jump NEXT: * bypass lastline:
LASTLINE: * if can cursor down
prevpara begline * go to para Begin
NEXT: * get ready to mark
markblockbegin * mark para Block begin
endpara * go to para end
markblockend * mark para end
gotoblockbeg * get ready to chech if macro
FIND "macrobegin" return * check if para is macro
"LI" return *
jtrue HASMACRO: * if para macro, go to HASMACRO
nextpara * if para not macro, nextpara
jfalse END: * end if last para not macro
unmarkblock * and unmark non-macro para
jump NEXT: * go back to NEXT, or
HASMACRO: * come here if para is macro
gotoblockend * get back to para end
writeblock "C:$.qm" return * write macro block to C:$.qm
return * put line at end of macro
editfile return quit * quit temp file from ring
editfile return * load macro block txtfile
DOS "qmacb " currentfilename * make macfile of macro block
backspace backspace backspace * remove '.qm'
return return * return from Dos
DOS "dir " currentfilename * get macfile size with Dir
backspace backspace * delete 'qm'
"mac >C:!" * add "mac", save list to temp
return return * back from Dos
killfile quit * kill/quit C:$.qm
editfile "C:!" return * load Dir listing of macfile
gotoline "4" return * drop down
wordright wordright markword * mark size
storescrbuff "2" return * get size to scrapbuff 2
killfile quit * kill/quit C:!
getscrbuff "1" return * insert orig file name
cut * get to scrap
editfile paste return * load orig file
begline * begline
"*" cursorright * put asterisk in column 1
getscrbuff "2" return * insert byte size of macro
endline cursorright "bytes" * add "bytes"
cursorright * space
insertdate inserttime * insert date and time
nextpara * go to next para
jfalse END: * stop if no more para
jump NEXT: * go to next if more para
END: *
*
* 200 bytes Thu 09-13-1990 19:13:19
*┌─────────────────────────────────────────────┐
*│ @0 Macro to show byte size of SINGLE macro. │
*└─────────────────────────────────────────────┘
* Place cursor line anywhere in a txtfile macro and press Alt_0. Macro
* size is added at the end of the macro as shown below. Macro must be a
* paragraph with NO blank lines. If the paragraph does NOT contain a
* macro, the macro stops executing with a beep, meaning "macro_begin"
* was not found in the paragraph. Insert must be ON.
@0 macrobegin
unmarkblock insertline begline * insert temp line
dropanchor currentfilename *
storescrbuff "1" return * get to scrbuff 1
cut * delete temp line
cursordown * move into macro
jtrue LASTLINE: * if cannot cursor down
endfile * are at endfile-no blank line
addline * put blank line
prevpara * go to parA Begin
jump NEXT: * bypass lastline:
LASTLINE: * if can cursor down
prevpara begline * go to macro begin
NEXT: * get ready to mark
markblockbegin * mark macro block begin
endpara * go to macro end
markblockend * mark macro end
gotoblockbeg * get to para begin
FIND "macrobegin" return * check if para is macro
"LI" return *
jtrue HASMACRO: * if para macro, go to HASMACRO
unmarkblock * if not unmark and end
jump END: *
HASMACRO: * come here if para has macro
gotoblockend * get back to para end
writeblock "C:$.qm" return * write macro block to C:$.qm
return * put line at end of macro
editfile return quit * quit temp file from ring
editfile return * load macro block txtfile
DOS "qmacb " currentfilename * make macfile of macro block
backspace backspace backspace * remove '.qm'
return return * return from Dos
DOS "dir " currentfilename * get macfile size with Dir
backspace backspace * delete 'qm'
"mac >C:!" * add 'mac", save list to temp
return return * back fom nns
killfile quit * kill/quit C:$.qm
editfile "C:!" return * load Dir listing of macfile
gotoline "4" return * drop down
wordright wordright markword * mark size
storescrbuff "2" return * get size to scrapbuff 2
killfile quit * kill/quit C:!
getscrbuff "1" return * insert orig file name
cut * get to scrap
editfile paste return * load orig file * edit currentfilename
begline * begline
"*" cursorright * put asterisk in column 1
getscrbuff "2" return * insert byte size of macro
endline cursorright "bytes" * add "bytes"
cursorright * space
insertdate inserttime * insert date and time
makectrofscreen * better view
END:
*
* 189 bytes Thu 09-13-1990 19:13:24
* ...Tom Hogshead Wed 10-31-1990